generic

   -- allow varied types to limit bytes in download when returning as String
   --    rather than using a function parameter

   Max_Download : Positive;

   --
   -- HTTP_Get
   --
   --    Parent: Website_Retrieval
   --
   --    Implementation of website retrieval using HTTP GET request.
   --

package Website_Retrieval.HTTP_Get is

   type Website_Retrieval_Object is new Website_Retrieval
         .Website_Retrieval_Object with null record;


   --
   -- Retrieve
   --
   --    wrapper for Retrieve, see below
   --
   --    provide convenience String parameters, defaults for file output
   --
   not overriding
   procedure Retrieve( Website_Retrieval_Obj : in out Website_Retrieval_Object;

                       Host_Address_Str : in String;

                       File_Name_Str    : in String );


   --
   -- Retrieve
   --
   --    Download a URL using HTTP.
   --
   --    Accepts canonical URL or IP and any path or query string.
   --

   overriding
   procedure Retrieve( Website_Retrieval_Obj : in out Website_Retrieval_Object;

                       Host_Address   : in Host_Address_Sub_Type;

                       Output         : in Write_To := Write_To'Value(
                           "String_Variable");

                       File_Name_Arg  : in File_Name_Type.Bounded_String :=
                           Empty_File_Name;

                       Output_Str_Arg : in out Output_String_Type
                           .Bounded_String;

                       Verbose        : in Boolean := false );


end Website_Retrieval.HTTP_Get;